Recent innovations with respect to Graphics Processing Units (GPUs) and graphics cards hosting GPUs have enabled increasingly fast image compositing operations. Turning first to two-dimensional compositing operations, these can now typically be performed using shading languages designed to run on a GPU. For example, given a set of images, a compositing order, and a compositing operation for each image, the GPU enables the copying of a background image from a frame buffer to a video memory (e.g., one or more texture processing units) of the GPU. The GPU may then use the background image and associated alpha channel information, along with a foreground texture and associated alpha channel information, to produce another background image in the frame buffer. This process is repeated by the GPU for each foreground image. Complications can arise because of the limited resources of the GPU and the time required to transfer images to the video memory. Many techniques are employed to minimize the transfer time and storage requirements.
Turning now to three-dimensional compositing, in contrast to two-dimensional compositing, three-dimensional compositing typically presents no fixed sorting order. Moreover, lighting effects (e.g., shadows) are not typically present in two-dimensional compositing and require a texture processing unit for shadow casting lights. Trackmattes also usually need a dedicated texture processing unit, and compositing also requires two textures coordinate processing unit, one for the background and one for the foreground. In view of the demand for texture processing units for the processing of effects, single pass algorithms for 3D compositing on a GPU may exceed the resources (e.g., the number of available texture processing units) of the GPU. If resource limits are exceeded, either effects need to be dropped, or alternatively the GPU will fail to render the scene. In the case where the GPU fails to render a scene, rendering of the scene may need to be assumed in software executing on the CPU.
The above described consumption of resources is increased substantially when a large number of lighting sources are present in an image to be rendered, as a texture processing unit is required for each and every shadow casting light.